package com.way.controller;

import com.way.config.DemoProperties;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@Slf4j
@RequestMapping("/config")
@RestController
public class ConfigController {

    @Resource
    private DemoProperties properties;

    @GetMapping("")
    public Map<String, Object> getProps() {
        log.info("properties: {}", properties);
        return properties.getProps();
    }

}
